<?php

namespace App\Http\Requests;

class BrandListRequest extends BaseRequest {
    /**
     * Get the validation rules that apply to the request.
     * @return string[]
     */
    public function rules(): array
    {
        return [
            'page' => 'integer|min:0',
            'pageSize' => 'integer|min:0',
            'sort' => 'string',
            'order' => 'string',
        ];
    }

    public function messages(): array
    {
        return [
            'page.integer' => '页码参数不正确',
            'pageSize.required' => '每页显示参数不正确',
            'sort.string' => '排序字段类型不正确',
            'order.string' => '排序方式不正确',
        ];
    }
}
